package com.yijiu.response;

import org.json.JSONException;
import org.json.JSONObject;

import com.yijiu.network.Response;
import com.yijiu.resource.RequestFieldFromServer;

/**
 * 个人信息请求后的响应
 * 
 * @author TangChao
 */
public class RequestPersonalInfoResponse extends Response
{
	public RequestFieldFromServer field;
	
	@Override
	protected void jsonToObject()
	{
		field = new RequestFieldFromServer();
		try
		{
			JSONObject jsonObject = reposonJson.getJSONObject("result");
			field.userName = jsonObject.optString("userName");
			field.realName = jsonObject.optString("realName");
			field.mobile = jsonObject.optString("mobile");
			field.message = jsonObject.optString("message");
			field.email = jsonObject.optString("mail");
			field.banklog = jsonObject.optString("banklog");
			field.bankOpenName = jsonObject.optString("bankOpenName");
			field.bankCardNo = jsonObject.optString("bankCardNo");
			field.bankName = jsonObject.optString("bankName");
			field.role = jsonObject.optInt("role");
			field.certNo = jsonObject.optString("certNo");
			field.realNameStatus = jsonObject.optString("realNameStatus");
			field.cardOff = jsonObject.optString("cardOff");
			field.memberNo = jsonObject.optString("memberNo");
			field.host = jsonObject.optString("host");
			field.certFrontPath = jsonObject.optString("certFrontPath");
			field.certBackPath = jsonObject.optString("certBackPath");
		}
		catch (JSONException e)
		{
			e.printStackTrace();
		}
	}
}
